﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<zeus.Core.Dispositivo>" %>


<script language="javascript" type="text/javascript">

    function processJson(data) {
        alert(data);
        $.nyroModalRemove();
        document.location.href = "/Recursos/Dispositivo";
    }

    $('form').ajaxForm({
        dataType: 'json',
        success: processJson,
        beforeSubmit: function (arr, $form, options) {
            return $form.validate().form();
        }
    });
</script>

<h1 id="nyroModalTitle">Búsqueda Por Posición</h1>

   <% Html.EnableClientValidation(); %>
   <% using (Html.BeginForm("NuevoDispositivo", "Recursos", FormMethod.Post, new { id = "nuevodispositivoForm" }))
      {%>
   <%= Html.ValidationSummary(false) %> 

            
<TABLE BORDER="0" CELLPADDING=2 CELLSPACING=2 WIDTH="30%" HEIGHT="10%">
	<TR>
		<TD COLSPAN=4 ALIGN=CENTER>
           <img src="../../Content/Images/popupdegrade.jpg"/ WIDTH="100%" height="25">
        </TD>
	</TR>
    <TR>
		<TD>		
			<TABLE BORDER="0" WIDTH="100%">
				<TR>
					<TD>
						<FONT COLOR="black">
                            <div class="editor-label">
                             <%= Html.LabelFor(model => model.Marca) %>
                            </div>
                        </FONT>
							<hr style="color: rgb(255,127,80); font-size:0;">
					</TD>
				</TR>
				<TR>
					<TD>
						 <div class="editor-field">
                            <%= Html.TextBoxFor(model => model.Marca)%>
                             <%= Html.ValidationMessageFor(model => model.Marca)%>
                        </div> 
					</TD>
				</TR>
			</TABLE>
		</TD>
		<TD>
			<TABLE BORDER="0" WIDTH="100%">
				<TR>
					<TD>
                        <FONT COLOR="black">
                        	 <div class="editor-label">
                            <%= Html.LabelFor(model => model.Modelo) %>
                            </div>
                        </FONT>
							<hr style="color: rgb(255,127,80) ;font-size:0;">
					</TD>
				</TR>
				<TR>
					<TD>
						<div class="editor-field">
                             <%= Html.TextBoxFor(model => model.Modelo)%>
                             <%= Html.ValidationMessageFor(model => model.Modelo)%>
                        </div>
					</TD>
				</TR>
			</TABLE>
		</TD>
		<TD>
			<TABLE BORDER="0" WIDTH="100%">
				<TR>
                    <FONT COLOR="black">
                        <div class="editor-label">
                          <%= Html.LabelFor(model => model.Tipo) %>
                        </div>
                     </FONT>
						<hr style="color: rgb(255,127,80) ;font-size:0;">
				</TR>
				<TR>
					<TD>
						 <div class="editor-field">
                             <%= Html.TextBoxFor(model => model.Tipo)%>
                             <%= Html.ValidationMessageFor(model => model.Tipo)%>
                         </div>
					</TD>
				</TR>
			</TABLE>
		</TD>
	</TR>
	<TR>
		<TD>
			<TABLE BORDER="0" WIDTH="100%">
				<TR>
                    <FONT COLOR="black">
                        <div class="editor-label">
                             <%= Html.LabelFor(model => model.Serial) %>
                        </div>
                    </FONT>
					 
						<hr style="color: rgb(255,127,80) ;font-size:0;">
				</TR>
				<TR>
					<TD>
						 <div class="editor-field">
                            <%= Html.TextBoxFor(model => model.Serial)%>
                             <%= Html.ValidationMessageFor(model => model.Serial)%>
                        </div>
					</TD>
				</TR>	
			</TABLE>
		</TD>
		<TD ROWSPAN=2 COLSPAN=2>
			<TABLE BORDER="0" WIDTH="100%">
				<TR>
					<FONT COLOR="black">
                        <div class="editor-label">
                            <%= Html.LabelFor(model => model.Observaciones) %>
                        </div>
                    </FONT>
						<hr style="color: rgb(255,127,80) ;font-size:0;">
				</TR>
					<div class="editor-field">
                         <%= Html.TextAreaFor(model => model.Observaciones)%>
                         <%= Html.ValidationMessageFor(model => model.Observaciones)%>
                    </div>  
			</TABLE>
		</TD>
		<TR>
			<TD>
				<TABLE BORDER="0" WIDTH="100%">
					<TR>
                    <FONT COLOR="black">
                         <div class="editor-label">
                            <%= Html.LabelFor(model => model.IMEI) %>
                         </div>
                    </FONT>
							<hr style="color: rgb(255,127,80) ;font-size:0;">
					</TR>
					<TR>
						<TD>
							 <div class="editor-field">
                                 <%= Html.TextBoxFor(model => model.IMEI)%>
                                 <%= Html.ValidationMessageFor(model => model.IMEI)%>
                             </div>
                            
						</TD>
					</TR>
                  </TABLE>
                  <p>
                     <center><input type="submit" value="Guardar"/></center>
                 </p>
			</TD>
             
		</TR>
             
	</TR>
    <TR>
		<TD COLSPAN=4 ALIGN=CENTER>
            <img src="../../Content/Images/popupdegrade2.jpg"/ WIDTH="100%" height="25">
        </TD>
    </TR>
   
</TABLE>
<% } %>
<script type="text/javascript">
    RefreshClientValidationMetadata();
</script>

